﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Twinkle.URLShortener
{
    public interface IURLCompressor
    {
        bool IsCompressed(string url);
        bool TryCompress(string url, out string compressed);
    }

    public interface IURLDecompressor
    {
        bool TryDecompress(string url, out string decompressed);
    }

    public abstract class URLShortenerBase : IURLCompressor, IURLDecompressor
    {
        public abstract bool IsCompressed(string url);
        public abstract bool TryCompress(string url, out string compressed);
        public abstract bool TryDecompress(string url, out string decompressed);
    }
}
